package com.example.block_chain.domain.pbft;

import lombok.AllArgsConstructor;
import lombok.Getter;

/*
 *@description: pbft投票状态码
 *@author: hisen
 *@Time: 2023/11/20  18:03
 */
@AllArgsConstructor
@Getter
public enum VoteEnum {
    REQUEST("发起写入区块请求", 1),
    PRE_PREPARE("节点自己生成block", 100),
    PREPARE("节点收到请求生成block，进入准备状态，并对外广播该状态", 200),
    COMMIT("每个节点收到2f+1个不同节点的commit消息后，则认为该区块已经达成一致，即进入commit状态，并将其持久化到区块链数据库中", 400);
    private final String msg;
    private final int code;
}
